from xmlrpc.server import SimpleXMLRPCServer

class Calculate:
    def add(self, x: int, y: int) -> int:
        return x + y

    def multiply(self, x: int, y: int) -> int:
        return x * y

    def substract(self, x: int, y: int) -> int:
        return x - y

    def divide(self, x: int, y: int) -> int:
        return x / y

obj = Calculate()
server = SimpleXMLRPCServer(("localhost", 8088))
server.register_instance(obj)
print("server start, listening on port 8088")
server.serve_forever()